<template>
  <div id="app" class='Pop-Over' ref="div1">
    <!--页眉组件-->
    <header-one :height2="height1"></header-one>
    <!--内容-->
    <router-view></router-view>
    <!--页脚组件-->
    <footer-one></footer-one>
  </div>
</template>
<script>
  //引入组件
  import HeaderOne from './components/firmware/header'
  import FooterOne from './components/firmware/footer.vue'
export default {
  data (){
      return{
          height1:''
      }
  },
  //注册组件
  components:{HeaderOne,FooterOne},
  //创建实例之后执行
  mounted:function () {
      var _self = this;
    this.$nextTick( () => {
      //获取div高度并赋值
      _self.height1 = (this.$refs.div1.clientHeight)+'px';
      console.log(_self.height1);
    })
    _self.height1 = (this.$refs.div1.clientHeight)+'px';
    console.log(_self.height1);
  }
}
</script>
<style>
#app{
  font-family: 'Avenir', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  font-size: 1rem;
  color: #2c3e50;
  margin: auto;
  min-width: 960px;
  width: 100%;
}
</style>
